<?php 
	require_once("admin/action/sys_conf.inc");
	$link_id = mysql_connect($DBHOST,$DBUSER,$DBPWD);
	mysql_select_db($DBNAME);
	mysql_query("SET NAMES 'utf8'");
	$id = 1;
	$uid = 1;//根据其他程序找到uid
	$sql = "select * from extpollsubject where id='$id'";
	$result = mysql_query($sql);
	$poll = mysql_fetch_assoc($result);
	$subject = $poll[subject];
	$startTime = $poll[startTime];
	$endTime = $poll[endTime];
	$pollType = $poll[pollType];
	$description = $poll[description];
	$creator = $poll[creator];
	switch($creator){
		case 1:
		$author = '仁爱慈善基金会';
		break;
	}
	$keywords = "重阳节,投票,竞选,敬老";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta id="Description" name="Description" content="<?php echo $description ?>" />
<meta id="Keywords" name="Keywords" content="<?php echo $keywords ?>" />
<meta name="author" content="<?php echo $author ?>" />
<title><?php echo $subject ?></title>
<script language="JavaScript" type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function(){
$("#inner").load("web/poll.php?id=<?php echo $id ?>");
});
function flip(page){
	if(page=='')
		return '';
	$("#inner").load("web/poll.php?id=<?php echo $id ?>&page="+page);
}
function vote(oid){
	$.ajax({
		url: "web/vote.php",
		data: "id="+oid,
		success: function(data){
			$("#pn_"+oid).html(data);
			alert('投票成功！');
		},
		error: function(){
			alert('您已经投过票了，请稍后再来投票！');
		}  	
	});		
}
</script>

</head>

<body>
<div id="inner"></div>
<iframe name="in" width="1" height="1" style="display:none" ></iframe>

</body>
</html>
